<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.15"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>MNN: include/HalideRuntime.h 源文件</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">MNN
   &#160;<span id="projectnumber">1.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.15 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',false,false,'search.php','搜索');
});
/* @license-end */</script>
<div id="main-nav"></div>
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">HalideRuntime.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="_halide_runtime_8h.html">浏览该文件的文档.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="preprocessor">#ifndef HALIDE_HALIDERUNTIME_H</span></div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="preprocessor">#define HALIDE_HALIDERUNTIME_H</span></div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;</div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="preprocessor">#include &lt;stddef.h&gt;</span></div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="preprocessor">#include &lt;stdint.h&gt;</span></div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="preprocessor">#include &lt;stdbool.h&gt;</span></div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;</div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="preprocessor">#ifdef __cplusplus</span></div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span> {</div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;</div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="comment">// Note that you should not use &quot;inline&quot; along with HALIDE_ALWAYS_INLINE;</span></div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="comment">// it is not necessary, and may produce warnings for some build configurations.</span></div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="preprocessor">#ifdef _MSC_VER</span></div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="preprocessor">#define HALIDE_ALWAYS_INLINE __forceinline</span></div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="preprocessor">#define HALIDE_NEVER_INLINE __declspec(noinline)</span></div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="preprocessor">#else</span></div><div class="line"><a name="l00018"></a><span class="lineno"><a class="line" href="_halide_runtime_8h.html#ac0c2048ce1a292798d15d9dc3346de26">   18</a></span>&#160;<span class="preprocessor">#define HALIDE_ALWAYS_INLINE __attribute__((always_inline)) inline</span></div><div class="line"><a name="l00019"></a><span class="lineno"><a class="line" href="_halide_runtime_8h.html#aaf5c75e0994add0b42829f89d0bf3345">   19</a></span>&#160;<span class="preprocessor">#define HALIDE_NEVER_INLINE __attribute__((noinline))</span></div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;</div><div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;<span class="comment">// Forward-declare to suppress warnings if compiling as C.</span></div><div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;<span class="keyword">struct </span><a class="code" href="structhalide__buffer__t.html">halide_buffer_t</a>;</div><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;</div><div class="line"><a name="l00059"></a><span class="lineno"><a class="line" href="_halide_runtime_8h.html#a9f4c40f298e91dea4f532774dc57a450">   59</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">enum</span> <a class="code" href="_halide_runtime_8h.html#a9f4c40f298e91dea4f532774dc57a450">halide_type_code_t</a></div><div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;{</div><div class="line"><a name="l00061"></a><span class="lineno"><a class="line" href="_halide_runtime_8h.html#a9f4c40f298e91dea4f532774dc57a450a53ba65448e4cbe66680c29a1333c8bfa">   61</a></span>&#160;    <a class="code" href="_halide_runtime_8h.html#a9f4c40f298e91dea4f532774dc57a450a53ba65448e4cbe66680c29a1333c8bfa">halide_type_int</a> = 0,   </div><div class="line"><a name="l00062"></a><span class="lineno"><a class="line" href="_halide_runtime_8h.html#a9f4c40f298e91dea4f532774dc57a450adfa8b0e2cbd616d1259c9471ec5c2b4d">   62</a></span>&#160;    <a class="code" href="_halide_runtime_8h.html#a9f4c40f298e91dea4f532774dc57a450adfa8b0e2cbd616d1259c9471ec5c2b4d">halide_type_uint</a> = 1,  </div><div class="line"><a name="l00063"></a><span class="lineno"><a class="line" href="_halide_runtime_8h.html#a9f4c40f298e91dea4f532774dc57a450a05c0160361d9fc5deb778f9a6744f42b">   63</a></span>&#160;    <a class="code" href="_halide_runtime_8h.html#a9f4c40f298e91dea4f532774dc57a450a05c0160361d9fc5deb778f9a6744f42b">halide_type_float</a> = 2, </div><div class="line"><a name="l00064"></a><span class="lineno"><a class="line" href="_halide_runtime_8h.html#a9f4c40f298e91dea4f532774dc57a450a22f25129c6493f710ace985e0f8f01ef">   64</a></span>&#160;    <a class="code" href="_halide_runtime_8h.html#a9f4c40f298e91dea4f532774dc57a450a22f25129c6493f710ace985e0f8f01ef">halide_type_handle</a> = 3 </div><div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;} <a class="code" href="_halide_runtime_8h.html#a9f4c40f298e91dea4f532774dc57a450">halide_type_code_t</a>;</div><div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;</div><div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;<span class="comment">// Note that while __attribute__ can go before or after the declaration,</span></div><div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;<span class="comment">// __declspec apparently is only allowed before.</span></div><div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;<span class="preprocessor">#ifndef HALIDE_ATTRIBUTE_ALIGN</span></div><div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;<span class="preprocessor">    #ifdef _MSC_VER</span></div><div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;<span class="preprocessor">        #define HALIDE_ATTRIBUTE_ALIGN(x) __declspec(align(x))</span></div><div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;<span class="preprocessor">    #else</span></div><div class="line"><a name="l00073"></a><span class="lineno"><a class="line" href="_halide_runtime_8h.html#afaa0f73fc7954ac27a2c11020681cdf3">   73</a></span>&#160;<span class="preprocessor">        #define HALIDE_ATTRIBUTE_ALIGN(x) __attribute__((aligned(x)))</span></div><div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;<span class="preprocessor">    #endif</span></div><div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;</div><div class="line"><a name="l00082"></a><span class="lineno"><a class="line" href="structhalide__type__t.html">   82</a></span>&#160;<span class="keyword">struct </span><a class="code" href="structhalide__type__t.html">halide_type_t</a> {</div><div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;<span class="preprocessor">#if __cplusplus &gt;= 201103L</span></div><div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;    <a class="code" href="structhalide__type__t.html#aab2af12cfbc140041449489b96e09846">HALIDE_ATTRIBUTE_ALIGN</a>(1) <a class="code" href="_halide_runtime_8h.html#a9f4c40f298e91dea4f532774dc57a450">halide_type_code_t</a> code; <span class="comment">// halide_type_code_t</span></div><div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;<span class="preprocessor">#else</span></div><div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;    <a class="code" href="structhalide__type__t.html#aab2af12cfbc140041449489b96e09846">HALIDE_ATTRIBUTE_ALIGN</a>(1) uint8_t code; <span class="comment">// halide_type_code_t</span></div><div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;</div><div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;    <a class="code" href="structhalide__type__t.html#aab2af12cfbc140041449489b96e09846">HALIDE_ATTRIBUTE_ALIGN</a>(1) uint8_t bits;</div><div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;</div><div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;    <a class="code" href="structhalide__type__t.html#aab2af12cfbc140041449489b96e09846">HALIDE_ATTRIBUTE_ALIGN</a>(2) uint16_t lanes;</div><div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;</div><div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;<span class="preprocessor">#ifdef __cplusplus</span></div><div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;</div><div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;    <a class="code" href="_halide_runtime_8h.html#ac0c2048ce1a292798d15d9dc3346de26">HALIDE_ALWAYS_INLINE</a> <a class="code" href="structhalide__type__t.html">halide_type_t</a>(<a class="code" href="_halide_runtime_8h.html#a9f4c40f298e91dea4f532774dc57a450">halide_type_code_t</a> code, uint8_t bits, uint16_t lanes = 1)</div><div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;        : code(code), bits(bits), lanes(lanes) {</div><div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;    }</div><div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;</div><div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;    <a class="code" href="_halide_runtime_8h.html#ac0c2048ce1a292798d15d9dc3346de26">HALIDE_ALWAYS_INLINE</a> <a class="code" href="structhalide__type__t.html">halide_type_t</a>() : code((<a class="code" href="_halide_runtime_8h.html#a9f4c40f298e91dea4f532774dc57a450">halide_type_code_t</a>)0), bits(0), lanes(0) {}</div><div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;</div><div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;    <a class="code" href="_halide_runtime_8h.html#ac0c2048ce1a292798d15d9dc3346de26">HALIDE_ALWAYS_INLINE</a> <span class="keywordtype">bool</span> operator==(<span class="keyword">const</span> <a class="code" href="structhalide__type__t.html">halide_type_t</a> &amp;other)<span class="keyword"> const </span>{</div><div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;        <span class="keywordflow">return</span> (code == other.code &amp;&amp;</div><div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;                bits == other.bits &amp;&amp;</div><div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;                lanes == other.lanes);</div><div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;    }</div><div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;</div><div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;    <a class="code" href="_halide_runtime_8h.html#ac0c2048ce1a292798d15d9dc3346de26">HALIDE_ALWAYS_INLINE</a> <span class="keywordtype">bool</span> operator!=(<span class="keyword">const</span> <a class="code" href="structhalide__type__t.html">halide_type_t</a> &amp;other)<span class="keyword"> const </span>{</div><div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;        <span class="keywordflow">return</span> !(*<span class="keyword">this</span> == other);</div><div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;    }</div><div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;</div><div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;    <a class="code" href="_halide_runtime_8h.html#ac0c2048ce1a292798d15d9dc3346de26">HALIDE_ALWAYS_INLINE</a> <span class="keywordtype">int</span> bytes()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> (bits + 7) / 8; }</div><div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;};</div><div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;</div><div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;<span class="keyword">struct </span>halide_device_interface_impl_t;</div><div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;</div><div class="line"><a name="l00143"></a><span class="lineno"><a class="line" href="structhalide__device__interface__t.html">  143</a></span>&#160;<span class="keyword">struct </span><a class="code" href="structhalide__device__interface__t.html">halide_device_interface_t</a> {</div><div class="line"><a name="l00144"></a><span class="lineno"><a class="line" href="structhalide__device__interface__t.html#aefe045212c1c0cc8993ad77b4c7d793b">  144</a></span>&#160;    int (*<a class="code" href="structhalide__device__interface__t.html#aefe045212c1c0cc8993ad77b4c7d793b">device_malloc</a>)(<span class="keywordtype">void</span> *user_context, <span class="keyword">struct </span><a class="code" href="structhalide__buffer__t.html">halide_buffer_t</a> *buf,</div><div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;                         <span class="keyword">const</span> <span class="keyword">struct </span><a class="code" href="structhalide__device__interface__t.html">halide_device_interface_t</a> *device_interface);</div><div class="line"><a name="l00146"></a><span class="lineno"><a class="line" href="structhalide__device__interface__t.html#ab0bd6619c5acb90929eefa8c94488ebe">  146</a></span>&#160;    int (*<a class="code" href="structhalide__device__interface__t.html#ab0bd6619c5acb90929eefa8c94488ebe">device_free</a>)(<span class="keywordtype">void</span> *user_context, <span class="keyword">struct </span><a class="code" href="structhalide__buffer__t.html">halide_buffer_t</a> *buf);</div><div class="line"><a name="l00147"></a><span class="lineno"><a class="line" href="structhalide__device__interface__t.html#ac7e27bf4acf3d42a41bca1ca15088170">  147</a></span>&#160;    int (*<a class="code" href="structhalide__device__interface__t.html#ac7e27bf4acf3d42a41bca1ca15088170">device_sync</a>)(<span class="keywordtype">void</span> *user_context, <span class="keyword">struct </span><a class="code" href="structhalide__buffer__t.html">halide_buffer_t</a> *buf);</div><div class="line"><a name="l00148"></a><span class="lineno"><a class="line" href="structhalide__device__interface__t.html#a8d54f5cfdce5abfe5079e746ec6e9a32">  148</a></span>&#160;    void (*<a class="code" href="structhalide__device__interface__t.html#a8d54f5cfdce5abfe5079e746ec6e9a32">device_release</a>)(<span class="keywordtype">void</span> *user_context,</div><div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;                           <span class="keyword">const</span> <span class="keyword">struct </span><a class="code" href="structhalide__device__interface__t.html">halide_device_interface_t</a> *device_interface);</div><div class="line"><a name="l00150"></a><span class="lineno"><a class="line" href="structhalide__device__interface__t.html#a94496f4e1181af69213ee72ad4e2664a">  150</a></span>&#160;    int (*<a class="code" href="structhalide__device__interface__t.html#a94496f4e1181af69213ee72ad4e2664a">copy_to_host</a>)(<span class="keywordtype">void</span> *user_context, <span class="keyword">struct </span><a class="code" href="structhalide__buffer__t.html">halide_buffer_t</a> *buf);</div><div class="line"><a name="l00151"></a><span class="lineno"><a class="line" href="structhalide__device__interface__t.html#aa7ec93c5a376610e3e7100e8b389591f">  151</a></span>&#160;    int (*<a class="code" href="structhalide__device__interface__t.html#aa7ec93c5a376610e3e7100e8b389591f">copy_to_device</a>)(<span class="keywordtype">void</span> *user_context, <span class="keyword">struct </span><a class="code" href="structhalide__buffer__t.html">halide_buffer_t</a> *buf,</div><div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;                          <span class="keyword">const</span> <span class="keyword">struct </span><a class="code" href="structhalide__device__interface__t.html">halide_device_interface_t</a> *device_interface);</div><div class="line"><a name="l00153"></a><span class="lineno"><a class="line" href="structhalide__device__interface__t.html#a0caa167abc636a7c7af4c602496e61cd">  153</a></span>&#160;    int (*<a class="code" href="structhalide__device__interface__t.html#a0caa167abc636a7c7af4c602496e61cd">device_and_host_malloc</a>)(<span class="keywordtype">void</span> *user_context, <span class="keyword">struct </span><a class="code" href="structhalide__buffer__t.html">halide_buffer_t</a> *buf,</div><div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;                                  <span class="keyword">const</span> <span class="keyword">struct </span><a class="code" href="structhalide__device__interface__t.html">halide_device_interface_t</a> *device_interface);</div><div class="line"><a name="l00155"></a><span class="lineno"><a class="line" href="structhalide__device__interface__t.html#adfe1bff4d8a864c6450bfe10adbed304">  155</a></span>&#160;    int (*<a class="code" href="structhalide__device__interface__t.html#adfe1bff4d8a864c6450bfe10adbed304">device_and_host_free</a>)(<span class="keywordtype">void</span> *user_context, <span class="keyword">struct </span><a class="code" href="structhalide__buffer__t.html">halide_buffer_t</a> *buf);</div><div class="line"><a name="l00156"></a><span class="lineno"><a class="line" href="structhalide__device__interface__t.html#af8cf3a57fb9d7b7e5906e5f5a5d87145">  156</a></span>&#160;    int (*<a class="code" href="structhalide__device__interface__t.html#af8cf3a57fb9d7b7e5906e5f5a5d87145">buffer_copy</a>)(<span class="keywordtype">void</span> *user_context, <span class="keyword">struct </span><a class="code" href="structhalide__buffer__t.html">halide_buffer_t</a> *src,</div><div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;                       <span class="keyword">const</span> <span class="keyword">struct </span><a class="code" href="structhalide__device__interface__t.html">halide_device_interface_t</a> *dst_device_interface, <span class="keyword">struct </span><a class="code" href="structhalide__buffer__t.html">halide_buffer_t</a> *dst);</div><div class="line"><a name="l00158"></a><span class="lineno"><a class="line" href="structhalide__device__interface__t.html#a8a091d3679d588771f88172b8a867bd2">  158</a></span>&#160;    int (*<a class="code" href="structhalide__device__interface__t.html#a8a091d3679d588771f88172b8a867bd2">device_crop</a>)(<span class="keywordtype">void</span> *user_context, <span class="keyword">const</span> <span class="keyword">struct </span><a class="code" href="structhalide__buffer__t.html">halide_buffer_t</a> *src,</div><div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;                       <span class="keyword">struct </span><a class="code" href="structhalide__buffer__t.html">halide_buffer_t</a> *dst);</div><div class="line"><a name="l00160"></a><span class="lineno"><a class="line" href="structhalide__device__interface__t.html#a3a61cbd45258f14821c95f9b62d38d29">  160</a></span>&#160;    int (*<a class="code" href="structhalide__device__interface__t.html#a3a61cbd45258f14821c95f9b62d38d29">device_release_crop</a>)(<span class="keywordtype">void</span> *user_context, <span class="keyword">struct </span><a class="code" href="structhalide__buffer__t.html">halide_buffer_t</a> *buf);</div><div class="line"><a name="l00161"></a><span class="lineno"><a class="line" href="structhalide__device__interface__t.html#a165c8b301ca4f0013af7767a63afd753">  161</a></span>&#160;    int (*<a class="code" href="structhalide__device__interface__t.html#a165c8b301ca4f0013af7767a63afd753">wrap_native</a>)(<span class="keywordtype">void</span> *user_context, <span class="keyword">struct </span><a class="code" href="structhalide__buffer__t.html">halide_buffer_t</a> *buf, uint64_t handle,</div><div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;                       <span class="keyword">const</span> <span class="keyword">struct </span><a class="code" href="structhalide__device__interface__t.html">halide_device_interface_t</a> *device_interface);</div><div class="line"><a name="l00163"></a><span class="lineno"><a class="line" href="structhalide__device__interface__t.html#ad22c6f186583b56c91652261e905038f">  163</a></span>&#160;    int (*<a class="code" href="structhalide__device__interface__t.html#ad22c6f186583b56c91652261e905038f">detach_native</a>)(<span class="keywordtype">void</span> *user_context, <span class="keyword">struct </span><a class="code" href="structhalide__buffer__t.html">halide_buffer_t</a> *buf);</div><div class="line"><a name="l00164"></a><span class="lineno"><a class="line" href="structhalide__device__interface__t.html#a0fd396e5aa336a352d86cff51e6099dd">  164</a></span>&#160;    <span class="keyword">const</span> <span class="keyword">struct </span>halide_device_interface_impl_t *<a class="code" href="structhalide__device__interface__t.html#a0fd396e5aa336a352d86cff51e6099dd">impl</a>;</div><div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;};</div><div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;</div><div class="line"><a name="l00167"></a><span class="lineno"><a class="line" href="structhalide__dimension__t.html">  167</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structhalide__dimension__t.html">halide_dimension_t</a> {</div><div class="line"><a name="l00168"></a><span class="lineno"><a class="line" href="structhalide__dimension__t.html#a80516014224196a33fc560fa023c4363">  168</a></span>&#160;    int32_t <a class="code" href="structhalide__dimension__t.html#a49c3d005ce7759e05105763f98112b87">min</a>, <a class="code" href="structhalide__dimension__t.html#a6c808a6b5accb9fc952917fa671fb9e8">extent</a>, <a class="code" href="structhalide__dimension__t.html#a80516014224196a33fc560fa023c4363">stride</a>;</div><div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160;</div><div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;    <span class="comment">// Per-dimension flags. None are defined yet (This is reserved for future use).</span></div><div class="line"><a name="l00171"></a><span class="lineno"><a class="line" href="structhalide__dimension__t.html#a6a8348375b0afd8e981e712726ac212c">  171</a></span>&#160;    uint32_t <a class="code" href="structhalide__dimension__t.html#a6a8348375b0afd8e981e712726ac212c">flags</a>;</div><div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;</div><div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;<span class="preprocessor">#ifdef __cplusplus</span></div><div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;    <a class="code" href="_halide_runtime_8h.html#ac0c2048ce1a292798d15d9dc3346de26">HALIDE_ALWAYS_INLINE</a> <a class="code" href="_halide_runtime_8h.html#a84da9f450b3335aeaf44fefb9be234e7">halide_dimension_t</a>() : <a class="code" href="structhalide__dimension__t.html#a49c3d005ce7759e05105763f98112b87">min</a>(0), <a class="code" href="structhalide__dimension__t.html#a6c808a6b5accb9fc952917fa671fb9e8">extent</a>(0), <a class="code" href="structhalide__dimension__t.html#a80516014224196a33fc560fa023c4363">stride</a>(0), <a class="code" href="structhalide__dimension__t.html#a6a8348375b0afd8e981e712726ac212c">flags</a>(0) {}</div><div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;    <a class="code" href="_halide_runtime_8h.html#ac0c2048ce1a292798d15d9dc3346de26">HALIDE_ALWAYS_INLINE</a> <a class="code" href="_halide_runtime_8h.html#a84da9f450b3335aeaf44fefb9be234e7">halide_dimension_t</a>(int32_t m, int32_t e, int32_t s, uint32_t f = 0) :</div><div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;        <a class="code" href="structhalide__dimension__t.html#a49c3d005ce7759e05105763f98112b87">min</a>(m), <a class="code" href="structhalide__dimension__t.html#a6c808a6b5accb9fc952917fa671fb9e8">extent</a>(e), <a class="code" href="structhalide__dimension__t.html#a80516014224196a33fc560fa023c4363">stride</a>(s), <a class="code" href="structhalide__dimension__t.html#a6a8348375b0afd8e981e712726ac212c">flags</a>(f) {}</div><div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;</div><div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160;    <a class="code" href="_halide_runtime_8h.html#ac0c2048ce1a292798d15d9dc3346de26">HALIDE_ALWAYS_INLINE</a> <span class="keywordtype">bool</span> operator==(<span class="keyword">const</span> <a class="code" href="structhalide__dimension__t.html">halide_dimension_t</a> &amp;other)<span class="keyword"> const </span>{</div><div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160;        <span class="keywordflow">return</span> (<a class="code" href="structhalide__dimension__t.html#a49c3d005ce7759e05105763f98112b87">min</a> == other.<a class="code" href="structhalide__dimension__t.html#a49c3d005ce7759e05105763f98112b87">min</a>) &amp;&amp;</div><div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;            (<a class="code" href="structhalide__dimension__t.html#a6c808a6b5accb9fc952917fa671fb9e8">extent</a> == other.<a class="code" href="structhalide__dimension__t.html#a6c808a6b5accb9fc952917fa671fb9e8">extent</a>) &amp;&amp;</div><div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160;            (<a class="code" href="structhalide__dimension__t.html#a80516014224196a33fc560fa023c4363">stride</a> == other.<a class="code" href="structhalide__dimension__t.html#a80516014224196a33fc560fa023c4363">stride</a>) &amp;&amp;</div><div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160;            (<a class="code" href="structhalide__dimension__t.html#a6a8348375b0afd8e981e712726ac212c">flags</a> == other.<a class="code" href="structhalide__dimension__t.html#a6a8348375b0afd8e981e712726ac212c">flags</a>);</div><div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;    }</div><div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;</div><div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;    <a class="code" href="_halide_runtime_8h.html#ac0c2048ce1a292798d15d9dc3346de26">HALIDE_ALWAYS_INLINE</a> <span class="keywordtype">bool</span> operator!=(<span class="keyword">const</span> <a class="code" href="structhalide__dimension__t.html">halide_dimension_t</a> &amp;other)<span class="keyword"> const </span>{</div><div class="line"><a name="l00186"></a><span class="lineno">  186</span>&#160;        <span class="keywordflow">return</span> !(*<span class="keyword">this</span> == other);</div><div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160;    }</div><div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160;} <a class="code" href="_halide_runtime_8h.html#a84da9f450b3335aeaf44fefb9be234e7">halide_dimension_t</a>;</div><div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160;</div><div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160;<span class="preprocessor">#ifdef __cplusplus</span></div><div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160;} <span class="comment">// extern &quot;C&quot;</span></div><div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00194"></a><span class="lineno">  194</span>&#160;</div><div class="line"><a name="l00195"></a><span class="lineno"><a class="line" href="_halide_runtime_8h.html#a320c79a12e6121c7468cb203373e6afc">  195</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">enum</span> {<a class="code" href="_halide_runtime_8h.html#a320c79a12e6121c7468cb203373e6afca1b91e0ac0aba5891e4c7219878da7460">halide_buffer_flag_host_dirty</a> = 1,</div><div class="line"><a name="l00196"></a><span class="lineno"><a class="line" href="_halide_runtime_8h.html#a320c79a12e6121c7468cb203373e6afca117e8a76112638ba6510e084e1dfb292">  196</a></span>&#160;              <a class="code" href="_halide_runtime_8h.html#a320c79a12e6121c7468cb203373e6afca117e8a76112638ba6510e084e1dfb292">halide_buffer_flag_device_dirty</a> = 2} <a class="code" href="_halide_runtime_8h.html#a320c79a12e6121c7468cb203373e6afc">halide_buffer_flags</a>;</div><div class="line"><a name="l00197"></a><span class="lineno">  197</span>&#160;</div><div class="line"><a name="l00203"></a><span class="lineno"><a class="line" href="structhalide__buffer__t.html">  203</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structhalide__buffer__t.html">halide_buffer_t</a> {</div><div class="line"><a name="l00205"></a><span class="lineno"><a class="line" href="structhalide__buffer__t.html#a51aa231b39c37cb777369dda8825030f">  205</a></span>&#160;    uint64_t <a class="code" href="structhalide__buffer__t.html#a51aa231b39c37cb777369dda8825030f">device</a>;</div><div class="line"><a name="l00206"></a><span class="lineno">  206</span>&#160;</div><div class="line"><a name="l00208"></a><span class="lineno"><a class="line" href="structhalide__buffer__t.html#ab449476b5d2b9a6eddb7bd813b7c8f6c">  208</a></span>&#160;    <span class="keyword">const</span> <span class="keyword">struct </span><a class="code" href="structhalide__device__interface__t.html">halide_device_interface_t</a> *<a class="code" href="structhalide__buffer__t.html#ab449476b5d2b9a6eddb7bd813b7c8f6c">device_interface</a>;</div><div class="line"><a name="l00209"></a><span class="lineno">  209</span>&#160;</div><div class="line"><a name="l00213"></a><span class="lineno"><a class="line" href="structhalide__buffer__t.html#a6e3420b357ead1398489ea508f3ac4a9">  213</a></span>&#160;    uint8_t* <a class="code" href="structhalide__buffer__t.html#a6e3420b357ead1398489ea508f3ac4a9">host</a>;</div><div class="line"><a name="l00214"></a><span class="lineno">  214</span>&#160;</div><div class="line"><a name="l00216"></a><span class="lineno"><a class="line" href="structhalide__buffer__t.html#acbee1a8a419c5ba3dcaedfabb3817c8c">  216</a></span>&#160;    uint64_t <a class="code" href="structhalide__buffer__t.html#acbee1a8a419c5ba3dcaedfabb3817c8c">flags</a>;</div><div class="line"><a name="l00217"></a><span class="lineno">  217</span>&#160;</div><div class="line"><a name="l00219"></a><span class="lineno"><a class="line" href="structhalide__buffer__t.html#a7aa90af2694ee99f6a097eaecbd7dcc2">  219</a></span>&#160;    <span class="keyword">struct </span><a class="code" href="structhalide__type__t.html">halide_type_t</a> <a class="code" href="structhalide__buffer__t.html#a7aa90af2694ee99f6a097eaecbd7dcc2">type</a>;</div><div class="line"><a name="l00220"></a><span class="lineno">  220</span>&#160;</div><div class="line"><a name="l00222"></a><span class="lineno"><a class="line" href="structhalide__buffer__t.html#a15a026342a3f8402f06d8b0f9f1391dc">  222</a></span>&#160;    int32_t <a class="code" href="structhalide__buffer__t.html#a15a026342a3f8402f06d8b0f9f1391dc">dimensions</a>;</div><div class="line"><a name="l00223"></a><span class="lineno">  223</span>&#160;</div><div class="line"><a name="l00226"></a><span class="lineno"><a class="line" href="structhalide__buffer__t.html#a36ad75ba5fff094906f338aa48722bbe">  226</a></span>&#160;    <a class="code" href="structhalide__dimension__t.html">halide_dimension_t</a> *<a class="code" href="structhalide__buffer__t.html#a36ad75ba5fff094906f338aa48722bbe">dim</a>;</div><div class="line"><a name="l00227"></a><span class="lineno">  227</span>&#160;</div><div class="line"><a name="l00229"></a><span class="lineno"><a class="line" href="structhalide__buffer__t.html#a0a1207bdde5e92c5b367a92c118a76c3">  229</a></span>&#160;    <span class="keywordtype">void</span> *<a class="code" href="structhalide__buffer__t.html#a0a1207bdde5e92c5b367a92c118a76c3">padding</a>;</div><div class="line"><a name="l00230"></a><span class="lineno">  230</span>&#160;} <a class="code" href="_halide_runtime_8h.html#a5c8ab0b07dcaa0d81d9abadae30242b6">halide_buffer_t</a>;</div><div class="line"><a name="l00231"></a><span class="lineno">  231</span>&#160;</div><div class="line"><a name="l00232"></a><span class="lineno">  232</span>&#160;</div><div class="line"><a name="l00233"></a><span class="lineno">  233</span>&#160;<span class="preprocessor">#ifdef __cplusplus</span></div><div class="line"><a name="l00234"></a><span class="lineno">  234</span>&#160;</div><div class="line"><a name="l00235"></a><span class="lineno">  235</span>&#160;<span class="keyword">namespace </span>{</div><div class="line"><a name="l00236"></a><span class="lineno">  236</span>&#160;<span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt; <span class="keyword">struct </span>check_is_pointer;</div><div class="line"><a name="l00237"></a><span class="lineno">  237</span>&#160;<span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt; <span class="keyword">struct </span>check_is_pointer&lt;T *&gt; {};</div><div class="line"><a name="l00238"></a><span class="lineno">  238</span>&#160;}</div><div class="line"><a name="l00239"></a><span class="lineno">  239</span>&#160;</div><div class="line"><a name="l00241"></a><span class="lineno">  241</span>&#160;<span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt;</div><div class="line"><a name="l00242"></a><span class="lineno">  242</span>&#160;<a class="code" href="_halide_runtime_8h.html#ac0c2048ce1a292798d15d9dc3346de26">HALIDE_ALWAYS_INLINE</a> <a class="code" href="structhalide__type__t.html">halide_type_t</a> halide_type_of() {</div><div class="line"><a name="l00243"></a><span class="lineno">  243</span>&#160;    <span class="comment">// Create a compile-time error if T is not a pointer (without</span></div><div class="line"><a name="l00244"></a><span class="lineno">  244</span>&#160;    <span class="comment">// using any includes - this code goes into the runtime).</span></div><div class="line"><a name="l00245"></a><span class="lineno">  245</span>&#160;    check_is_pointer&lt;T&gt; check;</div><div class="line"><a name="l00246"></a><span class="lineno">  246</span>&#160;    (void)check;</div><div class="line"><a name="l00247"></a><span class="lineno">  247</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="structhalide__type__t.html">halide_type_t</a>(<a class="code" href="_halide_runtime_8h.html#a9f4c40f298e91dea4f532774dc57a450a22f25129c6493f710ace985e0f8f01ef">halide_type_handle</a>, 64);</div><div class="line"><a name="l00248"></a><span class="lineno">  248</span>&#160;}</div><div class="line"><a name="l00249"></a><span class="lineno">  249</span>&#160;</div><div class="line"><a name="l00250"></a><span class="lineno">  250</span>&#160;<span class="keyword">template</span>&lt;&gt;</div><div class="line"><a name="l00251"></a><span class="lineno">  251</span>&#160;<a class="code" href="_halide_runtime_8h.html#ac0c2048ce1a292798d15d9dc3346de26">HALIDE_ALWAYS_INLINE</a> <a class="code" href="structhalide__type__t.html">halide_type_t</a> halide_type_of&lt;float&gt;() {</div><div class="line"><a name="l00252"></a><span class="lineno">  252</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="structhalide__type__t.html">halide_type_t</a>(<a class="code" href="_halide_runtime_8h.html#a9f4c40f298e91dea4f532774dc57a450a05c0160361d9fc5deb778f9a6744f42b">halide_type_float</a>, 32);</div><div class="line"><a name="l00253"></a><span class="lineno">  253</span>&#160;}</div><div class="line"><a name="l00254"></a><span class="lineno">  254</span>&#160;</div><div class="line"><a name="l00255"></a><span class="lineno">  255</span>&#160;<span class="keyword">template</span>&lt;&gt;</div><div class="line"><a name="l00256"></a><span class="lineno">  256</span>&#160;<a class="code" href="_halide_runtime_8h.html#ac0c2048ce1a292798d15d9dc3346de26">HALIDE_ALWAYS_INLINE</a> <a class="code" href="structhalide__type__t.html">halide_type_t</a> halide_type_of&lt;double&gt;() {</div><div class="line"><a name="l00257"></a><span class="lineno">  257</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="structhalide__type__t.html">halide_type_t</a>(<a class="code" href="_halide_runtime_8h.html#a9f4c40f298e91dea4f532774dc57a450a05c0160361d9fc5deb778f9a6744f42b">halide_type_float</a>, 64);</div><div class="line"><a name="l00258"></a><span class="lineno">  258</span>&#160;}</div><div class="line"><a name="l00259"></a><span class="lineno">  259</span>&#160;</div><div class="line"><a name="l00260"></a><span class="lineno">  260</span>&#160;<span class="keyword">template</span>&lt;&gt;</div><div class="line"><a name="l00261"></a><span class="lineno">  261</span>&#160;<a class="code" href="_halide_runtime_8h.html#ac0c2048ce1a292798d15d9dc3346de26">HALIDE_ALWAYS_INLINE</a> <a class="code" href="structhalide__type__t.html">halide_type_t</a> halide_type_of&lt;bool&gt;() {</div><div class="line"><a name="l00262"></a><span class="lineno">  262</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="structhalide__type__t.html">halide_type_t</a>(<a class="code" href="_halide_runtime_8h.html#a9f4c40f298e91dea4f532774dc57a450adfa8b0e2cbd616d1259c9471ec5c2b4d">halide_type_uint</a>, 1);</div><div class="line"><a name="l00263"></a><span class="lineno">  263</span>&#160;}</div><div class="line"><a name="l00264"></a><span class="lineno">  264</span>&#160;</div><div class="line"><a name="l00265"></a><span class="lineno">  265</span>&#160;<span class="keyword">template</span>&lt;&gt;</div><div class="line"><a name="l00266"></a><span class="lineno">  266</span>&#160;<a class="code" href="_halide_runtime_8h.html#ac0c2048ce1a292798d15d9dc3346de26">HALIDE_ALWAYS_INLINE</a> <a class="code" href="structhalide__type__t.html">halide_type_t</a> halide_type_of&lt;uint8_t&gt;() {</div><div class="line"><a name="l00267"></a><span class="lineno">  267</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="structhalide__type__t.html">halide_type_t</a>(<a class="code" href="_halide_runtime_8h.html#a9f4c40f298e91dea4f532774dc57a450adfa8b0e2cbd616d1259c9471ec5c2b4d">halide_type_uint</a>, 8);</div><div class="line"><a name="l00268"></a><span class="lineno">  268</span>&#160;}</div><div class="line"><a name="l00269"></a><span class="lineno">  269</span>&#160;</div><div class="line"><a name="l00270"></a><span class="lineno">  270</span>&#160;<span class="keyword">template</span>&lt;&gt;</div><div class="line"><a name="l00271"></a><span class="lineno">  271</span>&#160;<a class="code" href="_halide_runtime_8h.html#ac0c2048ce1a292798d15d9dc3346de26">HALIDE_ALWAYS_INLINE</a> <a class="code" href="structhalide__type__t.html">halide_type_t</a> halide_type_of&lt;uint16_t&gt;() {</div><div class="line"><a name="l00272"></a><span class="lineno">  272</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="structhalide__type__t.html">halide_type_t</a>(<a class="code" href="_halide_runtime_8h.html#a9f4c40f298e91dea4f532774dc57a450adfa8b0e2cbd616d1259c9471ec5c2b4d">halide_type_uint</a>, 16);</div><div class="line"><a name="l00273"></a><span class="lineno">  273</span>&#160;}</div><div class="line"><a name="l00274"></a><span class="lineno">  274</span>&#160;</div><div class="line"><a name="l00275"></a><span class="lineno">  275</span>&#160;<span class="keyword">template</span>&lt;&gt;</div><div class="line"><a name="l00276"></a><span class="lineno">  276</span>&#160;<a class="code" href="_halide_runtime_8h.html#ac0c2048ce1a292798d15d9dc3346de26">HALIDE_ALWAYS_INLINE</a> <a class="code" href="structhalide__type__t.html">halide_type_t</a> halide_type_of&lt;uint32_t&gt;() {</div><div class="line"><a name="l00277"></a><span class="lineno">  277</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="structhalide__type__t.html">halide_type_t</a>(<a class="code" href="_halide_runtime_8h.html#a9f4c40f298e91dea4f532774dc57a450adfa8b0e2cbd616d1259c9471ec5c2b4d">halide_type_uint</a>, 32);</div><div class="line"><a name="l00278"></a><span class="lineno">  278</span>&#160;}</div><div class="line"><a name="l00279"></a><span class="lineno">  279</span>&#160;</div><div class="line"><a name="l00280"></a><span class="lineno">  280</span>&#160;<span class="keyword">template</span>&lt;&gt;</div><div class="line"><a name="l00281"></a><span class="lineno">  281</span>&#160;<a class="code" href="_halide_runtime_8h.html#ac0c2048ce1a292798d15d9dc3346de26">HALIDE_ALWAYS_INLINE</a> <a class="code" href="structhalide__type__t.html">halide_type_t</a> halide_type_of&lt;uint64_t&gt;() {</div><div class="line"><a name="l00282"></a><span class="lineno">  282</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="structhalide__type__t.html">halide_type_t</a>(<a class="code" href="_halide_runtime_8h.html#a9f4c40f298e91dea4f532774dc57a450adfa8b0e2cbd616d1259c9471ec5c2b4d">halide_type_uint</a>, 64);</div><div class="line"><a name="l00283"></a><span class="lineno">  283</span>&#160;}</div><div class="line"><a name="l00284"></a><span class="lineno">  284</span>&#160;</div><div class="line"><a name="l00285"></a><span class="lineno">  285</span>&#160;<span class="keyword">template</span>&lt;&gt;</div><div class="line"><a name="l00286"></a><span class="lineno">  286</span>&#160;<a class="code" href="_halide_runtime_8h.html#ac0c2048ce1a292798d15d9dc3346de26">HALIDE_ALWAYS_INLINE</a> <a class="code" href="structhalide__type__t.html">halide_type_t</a> halide_type_of&lt;int8_t&gt;() {</div><div class="line"><a name="l00287"></a><span class="lineno">  287</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="structhalide__type__t.html">halide_type_t</a>(<a class="code" href="_halide_runtime_8h.html#a9f4c40f298e91dea4f532774dc57a450a53ba65448e4cbe66680c29a1333c8bfa">halide_type_int</a>, 8);</div><div class="line"><a name="l00288"></a><span class="lineno">  288</span>&#160;}</div><div class="line"><a name="l00289"></a><span class="lineno">  289</span>&#160;</div><div class="line"><a name="l00290"></a><span class="lineno">  290</span>&#160;<span class="keyword">template</span>&lt;&gt;</div><div class="line"><a name="l00291"></a><span class="lineno">  291</span>&#160;<a class="code" href="_halide_runtime_8h.html#ac0c2048ce1a292798d15d9dc3346de26">HALIDE_ALWAYS_INLINE</a> <a class="code" href="structhalide__type__t.html">halide_type_t</a> halide_type_of&lt;int16_t&gt;() {</div><div class="line"><a name="l00292"></a><span class="lineno">  292</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="structhalide__type__t.html">halide_type_t</a>(<a class="code" href="_halide_runtime_8h.html#a9f4c40f298e91dea4f532774dc57a450a53ba65448e4cbe66680c29a1333c8bfa">halide_type_int</a>, 16);</div><div class="line"><a name="l00293"></a><span class="lineno">  293</span>&#160;}</div><div class="line"><a name="l00294"></a><span class="lineno">  294</span>&#160;</div><div class="line"><a name="l00295"></a><span class="lineno">  295</span>&#160;<span class="keyword">template</span>&lt;&gt;</div><div class="line"><a name="l00296"></a><span class="lineno">  296</span>&#160;<a class="code" href="_halide_runtime_8h.html#ac0c2048ce1a292798d15d9dc3346de26">HALIDE_ALWAYS_INLINE</a> <a class="code" href="structhalide__type__t.html">halide_type_t</a> halide_type_of&lt;int32_t&gt;() {</div><div class="line"><a name="l00297"></a><span class="lineno">  297</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="structhalide__type__t.html">halide_type_t</a>(<a class="code" href="_halide_runtime_8h.html#a9f4c40f298e91dea4f532774dc57a450a53ba65448e4cbe66680c29a1333c8bfa">halide_type_int</a>, 32);</div><div class="line"><a name="l00298"></a><span class="lineno">  298</span>&#160;}</div><div class="line"><a name="l00299"></a><span class="lineno">  299</span>&#160;</div><div class="line"><a name="l00300"></a><span class="lineno">  300</span>&#160;<span class="keyword">template</span>&lt;&gt;</div><div class="line"><a name="l00301"></a><span class="lineno">  301</span>&#160;<a class="code" href="_halide_runtime_8h.html#ac0c2048ce1a292798d15d9dc3346de26">HALIDE_ALWAYS_INLINE</a> <a class="code" href="structhalide__type__t.html">halide_type_t</a> halide_type_of&lt;int64_t&gt;() {</div><div class="line"><a name="l00302"></a><span class="lineno">  302</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="structhalide__type__t.html">halide_type_t</a>(<a class="code" href="_halide_runtime_8h.html#a9f4c40f298e91dea4f532774dc57a450a53ba65448e4cbe66680c29a1333c8bfa">halide_type_int</a>, 64);</div><div class="line"><a name="l00303"></a><span class="lineno">  303</span>&#160;}</div><div class="line"><a name="l00304"></a><span class="lineno">  304</span>&#160;</div><div class="line"><a name="l00305"></a><span class="lineno">  305</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00306"></a><span class="lineno">  306</span>&#160;</div><div class="line"><a name="l00307"></a><span class="lineno">  307</span>&#160;<span class="preprocessor">#endif // HALIDE_HALIDERUNTIME_H</span></div><div class="ttc" id="structhalide__dimension__t_html"><div class="ttname"><a href="structhalide__dimension__t.html">halide_dimension_t</a></div><div class="ttdef"><b>Definition:</b> HalideRuntime.h:167</div></div>
<div class="ttc" id="_halide_runtime_8h_html_a320c79a12e6121c7468cb203373e6afca1b91e0ac0aba5891e4c7219878da7460"><div class="ttname"><a href="_halide_runtime_8h.html#a320c79a12e6121c7468cb203373e6afca1b91e0ac0aba5891e4c7219878da7460">halide_buffer_flag_host_dirty</a></div><div class="ttdef"><b>Definition:</b> HalideRuntime.h:195</div></div>
<div class="ttc" id="structhalide__device__interface__t_html_a0caa167abc636a7c7af4c602496e61cd"><div class="ttname"><a href="structhalide__device__interface__t.html#a0caa167abc636a7c7af4c602496e61cd">halide_device_interface_t::device_and_host_malloc</a></div><div class="ttdeci">int(* device_and_host_malloc)(void *user_context, struct halide_buffer_t *buf, const struct halide_device_interface_t *device_interface)</div><div class="ttdef"><b>Definition:</b> HalideRuntime.h:153</div></div>
<div class="ttc" id="_halide_runtime_8h_html_a84da9f450b3335aeaf44fefb9be234e7"><div class="ttname"><a href="_halide_runtime_8h.html#a84da9f450b3335aeaf44fefb9be234e7">halide_dimension_t</a></div><div class="ttdeci">struct halide_dimension_t halide_dimension_t</div></div>
<div class="ttc" id="structhalide__device__interface__t_html_ad22c6f186583b56c91652261e905038f"><div class="ttname"><a href="structhalide__device__interface__t.html#ad22c6f186583b56c91652261e905038f">halide_device_interface_t::detach_native</a></div><div class="ttdeci">int(* detach_native)(void *user_context, struct halide_buffer_t *buf)</div><div class="ttdef"><b>Definition:</b> HalideRuntime.h:163</div></div>
<div class="ttc" id="structhalide__device__interface__t_html_a165c8b301ca4f0013af7767a63afd753"><div class="ttname"><a href="structhalide__device__interface__t.html#a165c8b301ca4f0013af7767a63afd753">halide_device_interface_t::wrap_native</a></div><div class="ttdeci">int(* wrap_native)(void *user_context, struct halide_buffer_t *buf, uint64_t handle, const struct halide_device_interface_t *device_interface)</div><div class="ttdef"><b>Definition:</b> HalideRuntime.h:161</div></div>
<div class="ttc" id="structhalide__buffer__t_html_a7aa90af2694ee99f6a097eaecbd7dcc2"><div class="ttname"><a href="structhalide__buffer__t.html#a7aa90af2694ee99f6a097eaecbd7dcc2">halide_buffer_t::type</a></div><div class="ttdeci">struct halide_type_t type</div><div class="ttdef"><b>Definition:</b> HalideRuntime.h:219</div></div>
<div class="ttc" id="structhalide__device__interface__t_html_adfe1bff4d8a864c6450bfe10adbed304"><div class="ttname"><a href="structhalide__device__interface__t.html#adfe1bff4d8a864c6450bfe10adbed304">halide_device_interface_t::device_and_host_free</a></div><div class="ttdeci">int(* device_and_host_free)(void *user_context, struct halide_buffer_t *buf)</div><div class="ttdef"><b>Definition:</b> HalideRuntime.h:155</div></div>
<div class="ttc" id="_halide_runtime_8h_html_a9f4c40f298e91dea4f532774dc57a450a05c0160361d9fc5deb778f9a6744f42b"><div class="ttname"><a href="_halide_runtime_8h.html#a9f4c40f298e91dea4f532774dc57a450a05c0160361d9fc5deb778f9a6744f42b">halide_type_float</a></div><div class="ttdoc">floating point numbers</div><div class="ttdef"><b>Definition:</b> HalideRuntime.h:63</div></div>
<div class="ttc" id="structhalide__device__interface__t_html_aefe045212c1c0cc8993ad77b4c7d793b"><div class="ttname"><a href="structhalide__device__interface__t.html#aefe045212c1c0cc8993ad77b4c7d793b">halide_device_interface_t::device_malloc</a></div><div class="ttdeci">int(* device_malloc)(void *user_context, struct halide_buffer_t *buf, const struct halide_device_interface_t *device_interface)</div><div class="ttdef"><b>Definition:</b> HalideRuntime.h:144</div></div>
<div class="ttc" id="structhalide__device__interface__t_html_a8d54f5cfdce5abfe5079e746ec6e9a32"><div class="ttname"><a href="structhalide__device__interface__t.html#a8d54f5cfdce5abfe5079e746ec6e9a32">halide_device_interface_t::device_release</a></div><div class="ttdeci">void(* device_release)(void *user_context, const struct halide_device_interface_t *device_interface)</div><div class="ttdef"><b>Definition:</b> HalideRuntime.h:148</div></div>
<div class="ttc" id="structhalide__dimension__t_html_a6c808a6b5accb9fc952917fa671fb9e8"><div class="ttname"><a href="structhalide__dimension__t.html#a6c808a6b5accb9fc952917fa671fb9e8">halide_dimension_t::extent</a></div><div class="ttdeci">int32_t extent</div><div class="ttdef"><b>Definition:</b> HalideRuntime.h:168</div></div>
<div class="ttc" id="structhalide__buffer__t_html_acbee1a8a419c5ba3dcaedfabb3817c8c"><div class="ttname"><a href="structhalide__buffer__t.html#acbee1a8a419c5ba3dcaedfabb3817c8c">halide_buffer_t::flags</a></div><div class="ttdeci">uint64_t flags</div><div class="ttdef"><b>Definition:</b> HalideRuntime.h:216</div></div>
<div class="ttc" id="structhalide__dimension__t_html_a6a8348375b0afd8e981e712726ac212c"><div class="ttname"><a href="structhalide__dimension__t.html#a6a8348375b0afd8e981e712726ac212c">halide_dimension_t::flags</a></div><div class="ttdeci">uint32_t flags</div><div class="ttdef"><b>Definition:</b> HalideRuntime.h:171</div></div>
<div class="ttc" id="structhalide__buffer__t_html_a36ad75ba5fff094906f338aa48722bbe"><div class="ttname"><a href="structhalide__buffer__t.html#a36ad75ba5fff094906f338aa48722bbe">halide_buffer_t::dim</a></div><div class="ttdeci">halide_dimension_t * dim</div><div class="ttdef"><b>Definition:</b> HalideRuntime.h:226</div></div>
<div class="ttc" id="_halide_runtime_8h_html_a320c79a12e6121c7468cb203373e6afca117e8a76112638ba6510e084e1dfb292"><div class="ttname"><a href="_halide_runtime_8h.html#a320c79a12e6121c7468cb203373e6afca117e8a76112638ba6510e084e1dfb292">halide_buffer_flag_device_dirty</a></div><div class="ttdef"><b>Definition:</b> HalideRuntime.h:196</div></div>
<div class="ttc" id="_halide_runtime_8h_html_a9f4c40f298e91dea4f532774dc57a450adfa8b0e2cbd616d1259c9471ec5c2b4d"><div class="ttname"><a href="_halide_runtime_8h.html#a9f4c40f298e91dea4f532774dc57a450adfa8b0e2cbd616d1259c9471ec5c2b4d">halide_type_uint</a></div><div class="ttdoc">unsigned integers</div><div class="ttdef"><b>Definition:</b> HalideRuntime.h:62</div></div>
<div class="ttc" id="structhalide__device__interface__t_html_ac7e27bf4acf3d42a41bca1ca15088170"><div class="ttname"><a href="structhalide__device__interface__t.html#ac7e27bf4acf3d42a41bca1ca15088170">halide_device_interface_t::device_sync</a></div><div class="ttdeci">int(* device_sync)(void *user_context, struct halide_buffer_t *buf)</div><div class="ttdef"><b>Definition:</b> HalideRuntime.h:147</div></div>
<div class="ttc" id="structhalide__device__interface__t_html_aa7ec93c5a376610e3e7100e8b389591f"><div class="ttname"><a href="structhalide__device__interface__t.html#aa7ec93c5a376610e3e7100e8b389591f">halide_device_interface_t::copy_to_device</a></div><div class="ttdeci">int(* copy_to_device)(void *user_context, struct halide_buffer_t *buf, const struct halide_device_interface_t *device_interface)</div><div class="ttdef"><b>Definition:</b> HalideRuntime.h:151</div></div>
<div class="ttc" id="structhalide__device__interface__t_html_a3a61cbd45258f14821c95f9b62d38d29"><div class="ttname"><a href="structhalide__device__interface__t.html#a3a61cbd45258f14821c95f9b62d38d29">halide_device_interface_t::device_release_crop</a></div><div class="ttdeci">int(* device_release_crop)(void *user_context, struct halide_buffer_t *buf)</div><div class="ttdef"><b>Definition:</b> HalideRuntime.h:160</div></div>
<div class="ttc" id="_halide_runtime_8h_html_a5c8ab0b07dcaa0d81d9abadae30242b6"><div class="ttname"><a href="_halide_runtime_8h.html#a5c8ab0b07dcaa0d81d9abadae30242b6">halide_buffer_t</a></div><div class="ttdeci">struct halide_buffer_t halide_buffer_t</div></div>
<div class="ttc" id="structhalide__device__interface__t_html"><div class="ttname"><a href="structhalide__device__interface__t.html">halide_device_interface_t</a></div><div class="ttdef"><b>Definition:</b> HalideRuntime.h:143</div></div>
<div class="ttc" id="_halide_runtime_8h_html_a9f4c40f298e91dea4f532774dc57a450a22f25129c6493f710ace985e0f8f01ef"><div class="ttname"><a href="_halide_runtime_8h.html#a9f4c40f298e91dea4f532774dc57a450a22f25129c6493f710ace985e0f8f01ef">halide_type_handle</a></div><div class="ttdoc">opaque pointer type (void *)</div><div class="ttdef"><b>Definition:</b> HalideRuntime.h:64</div></div>
<div class="ttc" id="structhalide__buffer__t_html_a15a026342a3f8402f06d8b0f9f1391dc"><div class="ttname"><a href="structhalide__buffer__t.html#a15a026342a3f8402f06d8b0f9f1391dc">halide_buffer_t::dimensions</a></div><div class="ttdeci">int32_t dimensions</div><div class="ttdef"><b>Definition:</b> HalideRuntime.h:222</div></div>
<div class="ttc" id="structhalide__dimension__t_html_a80516014224196a33fc560fa023c4363"><div class="ttname"><a href="structhalide__dimension__t.html#a80516014224196a33fc560fa023c4363">halide_dimension_t::stride</a></div><div class="ttdeci">int32_t stride</div><div class="ttdef"><b>Definition:</b> HalideRuntime.h:168</div></div>
<div class="ttc" id="_halide_runtime_8h_html_ac0c2048ce1a292798d15d9dc3346de26"><div class="ttname"><a href="_halide_runtime_8h.html#ac0c2048ce1a292798d15d9dc3346de26">HALIDE_ALWAYS_INLINE</a></div><div class="ttdeci">#define HALIDE_ALWAYS_INLINE</div><div class="ttdef"><b>Definition:</b> HalideRuntime.h:18</div></div>
<div class="ttc" id="structhalide__type__t_html"><div class="ttname"><a href="structhalide__type__t.html">halide_type_t</a></div><div class="ttdef"><b>Definition:</b> HalideRuntime.h:82</div></div>
<div class="ttc" id="structhalide__buffer__t_html_ab449476b5d2b9a6eddb7bd813b7c8f6c"><div class="ttname"><a href="structhalide__buffer__t.html#ab449476b5d2b9a6eddb7bd813b7c8f6c">halide_buffer_t::device_interface</a></div><div class="ttdeci">const struct halide_device_interface_t * device_interface</div><div class="ttdef"><b>Definition:</b> HalideRuntime.h:208</div></div>
<div class="ttc" id="structhalide__buffer__t_html_a6e3420b357ead1398489ea508f3ac4a9"><div class="ttname"><a href="structhalide__buffer__t.html#a6e3420b357ead1398489ea508f3ac4a9">halide_buffer_t::host</a></div><div class="ttdeci">uint8_t * host</div><div class="ttdef"><b>Definition:</b> HalideRuntime.h:213</div></div>
<div class="ttc" id="structhalide__device__interface__t_html_a0fd396e5aa336a352d86cff51e6099dd"><div class="ttname"><a href="structhalide__device__interface__t.html#a0fd396e5aa336a352d86cff51e6099dd">halide_device_interface_t::impl</a></div><div class="ttdeci">const struct halide_device_interface_impl_t * impl</div><div class="ttdef"><b>Definition:</b> HalideRuntime.h:164</div></div>
<div class="ttc" id="structhalide__dimension__t_html_a49c3d005ce7759e05105763f98112b87"><div class="ttname"><a href="structhalide__dimension__t.html#a49c3d005ce7759e05105763f98112b87">halide_dimension_t::min</a></div><div class="ttdeci">int32_t min</div><div class="ttdef"><b>Definition:</b> HalideRuntime.h:168</div></div>
<div class="ttc" id="structhalide__buffer__t_html_a0a1207bdde5e92c5b367a92c118a76c3"><div class="ttname"><a href="structhalide__buffer__t.html#a0a1207bdde5e92c5b367a92c118a76c3">halide_buffer_t::padding</a></div><div class="ttdeci">void * padding</div><div class="ttdef"><b>Definition:</b> HalideRuntime.h:229</div></div>
<div class="ttc" id="_halide_runtime_8h_html_a9f4c40f298e91dea4f532774dc57a450"><div class="ttname"><a href="_halide_runtime_8h.html#a9f4c40f298e91dea4f532774dc57a450">halide_type_code_t</a></div><div class="ttdeci">halide_type_code_t</div><div class="ttdef"><b>Definition:</b> HalideRuntime.h:59</div></div>
<div class="ttc" id="structhalide__device__interface__t_html_a94496f4e1181af69213ee72ad4e2664a"><div class="ttname"><a href="structhalide__device__interface__t.html#a94496f4e1181af69213ee72ad4e2664a">halide_device_interface_t::copy_to_host</a></div><div class="ttdeci">int(* copy_to_host)(void *user_context, struct halide_buffer_t *buf)</div><div class="ttdef"><b>Definition:</b> HalideRuntime.h:150</div></div>
<div class="ttc" id="structhalide__buffer__t_html_a51aa231b39c37cb777369dda8825030f"><div class="ttname"><a href="structhalide__buffer__t.html#a51aa231b39c37cb777369dda8825030f">halide_buffer_t::device</a></div><div class="ttdeci">uint64_t device</div><div class="ttdef"><b>Definition:</b> HalideRuntime.h:205</div></div>
<div class="ttc" id="structhalide__device__interface__t_html_af8cf3a57fb9d7b7e5906e5f5a5d87145"><div class="ttname"><a href="structhalide__device__interface__t.html#af8cf3a57fb9d7b7e5906e5f5a5d87145">halide_device_interface_t::buffer_copy</a></div><div class="ttdeci">int(* buffer_copy)(void *user_context, struct halide_buffer_t *src, const struct halide_device_interface_t *dst_device_interface, struct halide_buffer_t *dst)</div><div class="ttdef"><b>Definition:</b> HalideRuntime.h:156</div></div>
<div class="ttc" id="structhalide__buffer__t_html"><div class="ttname"><a href="structhalide__buffer__t.html">halide_buffer_t</a></div><div class="ttdef"><b>Definition:</b> HalideRuntime.h:203</div></div>
<div class="ttc" id="structhalide__type__t_html_aab2af12cfbc140041449489b96e09846"><div class="ttname"><a href="structhalide__type__t.html#aab2af12cfbc140041449489b96e09846">halide_type_t::HALIDE_ATTRIBUTE_ALIGN</a></div><div class="ttdeci">HALIDE_ATTRIBUTE_ALIGN(1) uint8_t code</div></div>
<div class="ttc" id="_halide_runtime_8h_html_a320c79a12e6121c7468cb203373e6afc"><div class="ttname"><a href="_halide_runtime_8h.html#a320c79a12e6121c7468cb203373e6afc">halide_buffer_flags</a></div><div class="ttdeci">halide_buffer_flags</div><div class="ttdef"><b>Definition:</b> HalideRuntime.h:195</div></div>
<div class="ttc" id="structhalide__device__interface__t_html_a8a091d3679d588771f88172b8a867bd2"><div class="ttname"><a href="structhalide__device__interface__t.html#a8a091d3679d588771f88172b8a867bd2">halide_device_interface_t::device_crop</a></div><div class="ttdeci">int(* device_crop)(void *user_context, const struct halide_buffer_t *src, struct halide_buffer_t *dst)</div><div class="ttdef"><b>Definition:</b> HalideRuntime.h:158</div></div>
<div class="ttc" id="_halide_runtime_8h_html_a9f4c40f298e91dea4f532774dc57a450a53ba65448e4cbe66680c29a1333c8bfa"><div class="ttname"><a href="_halide_runtime_8h.html#a9f4c40f298e91dea4f532774dc57a450a53ba65448e4cbe66680c29a1333c8bfa">halide_type_int</a></div><div class="ttdoc">signed integers</div><div class="ttdef"><b>Definition:</b> HalideRuntime.h:61</div></div>
<div class="ttc" id="structhalide__device__interface__t_html_ab0bd6619c5acb90929eefa8c94488ebe"><div class="ttname"><a href="structhalide__device__interface__t.html#ab0bd6619c5acb90929eefa8c94488ebe">halide_device_interface_t::device_free</a></div><div class="ttdeci">int(* device_free)(void *user_context, struct halide_buffer_t *buf)</div><div class="ttdef"><b>Definition:</b> HalideRuntime.h:146</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者 &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.15
</small></address>
</body>
</html>
